package com.ljf.framework.security;

import java.util.function.BiFunction;

/**
 * 说明：
 *
 * @Auther: lijinfeng
 * @Date: 2022/12/12
 */
public class LjfSecurityConfig {
    /**
     * 用户校验函数，验证用户信息，正确返回用户ID 错误返回0L
     */
    public BiFunction<String, String, Long> checkUserHandler = (u, p) ->{
        return 0L;
    };

    /**
     * 设置登录用户校验函数
     *
     * @param checkUserHandler
     * @return
     */
    public void setCheckUserHandler(BiFunction<String, String, Long> checkUserHandler) {
        this.checkUserHandler = checkUserHandler;
    }

    /**
     * 获取登录用户校验函数
     *
     * @return
     */
    public BiFunction<String, String, Long> getCheckUserHandler() {
        return checkUserHandler;
    }

}
